package cn.mdx.mapper;

import cn.mdx.pojo.Result;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.ArrayList;
import java.util.List;

@Repository
public interface ResultMapper {
    int deleteByPrimaryKey(Integer rid);

    int insert(Result record);

    int insertSelective(Result record);

    Result selectByPrimaryKey(Integer rid);

    int updateByPrimaryKeySelective(Result record);

    int updateByPrimaryKeyWithBLOBs(Result record);

    int updateByPrimaryKey(Result record);

    ArrayList<Result> getResultList(Integer uid);

    ArrayList<Result> getResultListGroupByAchievement(Integer aid);

    Result findResultBySid(Integer sid);

    Result findResultByDid(Integer did);

    /*sfx====================================================================*/
    Result selectBySid(@Param("sid") Integer sid);

    Result selectByDid(@Param("did") Integer did);

    List<Result> selectByAid(@Param("aid") Integer aid);


    //根据pid获取Result
    List<Result> getResultByPid(@Param("ids") Integer pid);

    List<Result> selectAllResultByCid(@Param("cid") Integer cid);

    List<Result> getResultByDid(@Param("did") Integer did);


    List<Result> selectByCid(@Param("cid") Integer cid);
}